package cont;

import java.net.URL;
import java.util.ResourceBundle;

import javafx.event.ActionEvent;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.input.MouseEvent;

public class Controller implements Initializable  {

	
	@FXML private TextField textField;
	@FXML private Button button;
	
	
	@Override
	public void initialize(URL arg0, ResourceBundle arg1) {
		textField.setText("BAAAA");
		
		button.setOnAction(new EventHandler<ActionEvent>() {
			
			@Override
			public void handle(ActionEvent arg0) {
				// TODO Auto-generated method stub
				textField.setText("GGG");
			}
		});
		
		
		button.setOnDragDetected(new EventHandler<Event>() {

			@Override
			public void handle(Event event) {
				// TODO Auto-generated method stub
				textField.setText("DRAG");
				
			}
		});
		
		
	}

}
